package com.sping_boot3.spirng_boot3.juc;

import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.locks.ReentrantLock;

public class Main {
/*    static ReentrantLock lock = new ReentrantLock();
    public volatile static int number = 10;*/
    public static void main(String[] args) {
//        CopyOnWriteArrayList<String> copyOnWriteArrayList = new CopyOnWriteArrayList<>();
//        copyOnWriteArrayList.add("a");
//        copyOnWriteArrayList.add("b");
//        copyOnWriteArrayList.add("c");
//        System.out.println(copyOnWriteArrayList);
//        Ticket ticket = new Ticket();
/*        Ticket_Lock ticket = new Ticket_Lock();
        new Thread(()->{
            for (int i = 0; i < 40; i++) {
                ticket.sale();
            }
        },"A").start();
        new Thread(()->{
            for (int i = 0; i < 40; i++) {
                ticket.sale();
            }
        },"B").start();
        new Thread(()->{
            for (int i = 0; i < 40; i++) {
                ticket.sale();
            }
        },"C").start();*/
        Hashtable<String,String> strings = new Hashtable<>();
        System.out.println(49 & 0x7FFFFFFF);
        System.out.println(45 & 1231231231);
        HashMap<String,String> strings1 = new HashMap<>();
        strings1.put("1","12");
        for (int i = 0; i < 18; i++) {
            strings.put(String.valueOf(i),"A"+i);
            System.out.println(i);
        }

    }
}
